Skip to content

Feat: Support VCN Native CNI/Native Pod Networking changes #399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

sindhusri16
Copy link
Member

@sindhusri16 sindhusri16 commented Feb 24, 2025

Feat: Support VCN Native CNI/Native Pod Networking changes

What this PR does / why we need it:
This includes new fields to support vcn native cni using native pod networking. Fields are introduced at the machine and machinetemplate level to include the cniType param. OKE on PCA needs this feature and could be supported when NPN is open as well.

Which issue(s) this PR fixes (optional, in fixes #(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #357

shyamradhakrishnan and others added 25 commits April 27, 2024 10:01
* Update to CAPI 1.7
* Add support for kubernetes v1.29
* Add support for multiple CIDR in vcn and fix dns label bug
* Fix the label in CRD for versions and add more parameters to NLB spec
Using KUBERNETES_VERSION instead of OCI_MANAGED_KUBERNETES_VERSION
will have a version mismatch and the managed nodes will fail
to join.
Since we aren't really doing these anymore I'll remove the section.
…#385)

* changed wrClient to nlb and lb client to fetch core work-requests.

* combine error events into single message

* concatention changes
This was left out of the previous feature add.
…ment (oracle#395)

* updated tilt-helper

1.updated tilt image golang version to 1.21.8
2.added bash to kustomize-sub.sh call

Signed-off-by: Mayank Kakani <[email protected]>

* Update types.go

Added LaunchParavirtualizedVolumeAttachment types to v1

* Update types.go

added LaunchParavirtualizedVolumeAttachment type

* Update machine.go

Added support for getParavirtualizedVolumeAttachment

* Update infrastructure.cluster.x-k8s.io_ocimachines.yaml

added launchParavirtualizedVolumeAttachment defination

* Update infrastructure.cluster.x-k8s.io_ocimachinetemplates.yaml

added launchParavirtualizedVolumeAttachment definations

* Update go.mod

Updated OCI go sdk version to  v65.81.1 to support paravirtualized volume

* Update go.sum

Updated OCI SDK version

* Update machine_test.go

added test for paravirtualized volumes

* Update machine.go

updated message "Unknown attachment type not supported"

* Update machine_test.go

updated name - "check all params together, with paravirtualized volume support"

* Fixed unittests

Fixed paravirtualized volume support unit test case

---------

Signed-off-by: Mayank Kakani <[email protected]>
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Feb 24, 2025
@sindhusri16 sindhusri16 changed the title Vcn native changes Feat: Support VCN Native CNI/Native Pod Networking changes Feb 28, 2025
@sindhusri16 sindhusri16 requested a review from joekr February 28, 2025 19:12
@sindhusri16
Copy link
Member Author

Unittest output:
GOBIN=/home/opc/cluster-api-provider-oci/hack/tools/bin ./scripts/go_install.sh sigs.k8s.io/controller-runtime/tools/setup-envtest setup-envtest v0.0.0-20230131074648-f5014c077fc3
kube-builder assets: /home/opc/.local/share/kubebuilder-envtest/k8s/1.24.2-linux-amd64
KUBEBUILDER_ASSETS="/home/opc/.local/share/kubebuilder-envtest/k8s/1.24.2-linux-amd64" go test -coverprofile=coverage.out ./...
? github.com/oracle/cluster-api-provider-oci [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/config [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/metrics [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/scope/mocks [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/base [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/base/mock_base [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/compute [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/compute/mock_compute [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/computemanagement [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/computemanagement/mock_computemanagement [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/containerengine [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/containerengine/mock_containerengine [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/identity [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/identity/mock_identity [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/loadbalancer [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/loadbalancer/mock_lb [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/networkloadbalancer [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/networkloadbalancer/mock_nlb [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/vcn [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/vcn/mock_vcn [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/workrequests [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/workrequests/mock_workrequests [no test files]
? github.com/oracle/cluster-api-provider-oci/feature [no test files]
? github.com/oracle/cluster-api-provider-oci/version [no test files]
ok github.com/oracle/cluster-api-provider-oci/api/v1beta1 89.740s coverage: 23.6% of statements
ok github.com/oracle/cluster-api-provider-oci/api/v1beta2 0.052s coverage: 14.6% of statements
ok github.com/oracle/cluster-api-provider-oci/cloud/ociutil 0.012s coverage: 15.9% of statements
ok github.com/oracle/cluster-api-provider-oci/cloud/scope 20.148s coverage: 74.7% of statements
ok github.com/oracle/cluster-api-provider-oci/cloud/util 0.623s coverage: 61.1% of statements
ok github.com/oracle/cluster-api-provider-oci/controllers 2.077s coverage: 58.4% of statements
ok github.com/oracle/cluster-api-provider-oci/exp/api/v1beta1 31.177s coverage: 15.3% of statements
ok github.com/oracle/cluster-api-provider-oci/exp/api/v1beta2 0.028s coverage: 4.8% of statements
ok github.com/oracle/cluster-api-provider-oci/exp/controllers 0.374s coverage: 56.3% of statements
go tool cover -func=coverage.out -o coverage.txt
go tool cover -html=coverage.out -o coverage.html

@joekr
Copy link
Member

joekr commented Mar 3, 2025

e2e tests

Ran 7 of 28 Specs in 2637.402 seconds
SUCCESS! -- 7 Passed | 0 Failed | 0 Pending | 21 Skipped

npnVersion = "oci.oraclecloud.com/v1beta1"
npnKind = "NativePodNetwork"
apiExtensionVersion = "apiextensions.k8s.io/v1"
npnCrdName = "nativepodnetworks.oci.oraclecloud.com"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these needed here now?

@sindhusri16
Copy link
Member Author

Unittests after the latest commit

make test
GOBIN=/home/opc/cluster-api-provider-oci/hack/tools/bin ./scripts/go_install.sh sigs.k8s.io/controller-runtime/tools/setup-envtest setup-envtest v0.0.0-20230131074648-f5014c077fc3
kube-builder assets: /home/opc/.local/share/kubebuilder-envtest/k8s/1.24.2-linux-amd64
KUBEBUILDER_ASSETS="/home/opc/.local/share/kubebuilder-envtest/k8s/1.24.2-linux-amd64" go test -coverprofile=coverage.out ./...
? github.com/oracle/cluster-api-provider-oci [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/config [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/metrics [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/scope/mocks [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/base [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/base/mock_base [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/compute [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/compute/mock_compute [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/computemanagement [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/computemanagement/mock_computemanagement [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/containerengine [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/containerengine/mock_containerengine [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/identity [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/identity/mock_identity [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/loadbalancer [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/loadbalancer/mock_lb [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/networkloadbalancer [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/networkloadbalancer/mock_nlb [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/vcn [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/vcn/mock_vcn [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/workrequests [no test files]
? github.com/oracle/cluster-api-provider-oci/cloud/services/workrequests/mock_workrequests [no test files]
? github.com/oracle/cluster-api-provider-oci/feature [no test files]
? github.com/oracle/cluster-api-provider-oci/version [no test files]
ok github.com/oracle/cluster-api-provider-oci/api/v1beta1 97.718s coverage: 23.6% of statements
ok github.com/oracle/cluster-api-provider-oci/api/v1beta2 0.053s coverage: 14.6% of statements
ok github.com/oracle/cluster-api-provider-oci/cloud/ociutil 0.005s coverage: 15.9% of statements
ok github.com/oracle/cluster-api-provider-oci/cloud/scope 20.314s coverage: 74.7% of statements
ok github.com/oracle/cluster-api-provider-oci/cloud/util 0.733s coverage: 61.1% of statements
ok github.com/oracle/cluster-api-provider-oci/controllers 2.161s coverage: 58.4% of statements
ok github.com/oracle/cluster-api-provider-oci/exp/api/v1beta1 31.113s coverage: 15.3% of statements
ok github.com/oracle/cluster-api-provider-oci/exp/api/v1beta2 0.059s coverage: 4.8% of statements
ok github.com/oracle/cluster-api-provider-oci/exp/controllers 0.943s coverage: 56.3% of statements
go tool cover -func=coverage.out -o coverage.txt
go tool cover -html=coverage.out -o coverage.html

@sindhusri16 sindhusri16 changed the base branch from main to release-v0.15.0 April 18, 2025 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Pod Communication network options like OCI OKE
5 participants